﻿using System;

namespace Flagwind.Expressions.Tokenization
{
	public class BooleanTokenizer : LiteralTokenizerBase
	{
		#region 构造方法

		public BooleanTokenizer() : base(true, "true", "false")
		{
		}

		#endregion

		#region 重写方法

		protected override Token CreateToken(string literal)
		{
			return bool.Parse(literal) ? Token.True : Token.False;
		}

		#endregion
	}
}